package com.zs.blog.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Title: FriendLink
 * @Author zs
 * @Package com.zs.blog.model.entity
 * @Date 2024/10/11 22:53
 * @description: 友链表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("bim_friend_link")
public class FriendLink {

    @Schema(description = "友链ID")
    @TableId(type = IdType.AUTO)
    public Long id;

    @Schema(description = "用户ID")
    public Long userId;

    @Schema(description = "友链名称")
    public String flName;

    @Schema(description = "友链URL")
    public String flUrl;

    @Schema(description = "友链头像")
    public String flAvatar;

    @Schema(description = "友链描述")
    public String flDescription;

    @Schema(description = "邮件")
    public String email;

    @Schema(description = "状态 [0:上架,1:下架]")
    public Integer status;

    @Schema(description = "下架原因")
    public String removeReason;

    @Schema(description = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updateTime;
}
